#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int m = 5;
	int a = 0;
	scanf("%d", &a);
	int Sn = 0;
	int b = a;
	while (m--)
	{
		Sn+=b;
		b = b * 10 + a;
	}
	printf("%d", Sn);
	return 0;
}